package edu.dgut.bbssystem.service;

import edu.dgut.bbssystem.common.PageInfo;
import edu.dgut.bbssystem.pojo.User;

import javax.servlet.http.HttpSession;

public interface UserService {
    int add(User user);

    /**
     * 判断用户名字是否存在
     * @param userName
     */
    boolean existUserName(String userName);

    int login(User user, HttpSession session);

    User getById(Integer userId);

    int update(User user);

    PageInfo<User> pageQueryAll(int pageNum, int pageSize);

    int deleteUsersByIds(int[] userIds);

    int logout(HttpSession session);

    int getUserId(HttpSession session);
}
